package com.atguigu.edu.service;

import com.atguigu.edu.entity.Course;
import com.atguigu.edu.entity.vo.CourseInfoVo;
import com.atguigu.edu.entity.vo.CoursePublishVo;
import com.atguigu.edu.entity.vo.front.CourseWebVo;
import com.baomidou.mybatisplus.extension.service.IService;

import java.util.List;

/**
 * <p>
 * 课程 服务类
 * </p>
 *
 * @author admin
 * @since 2020-07-06
 */
public interface CourseService extends IService<Course> {

    String addCourse(CourseInfoVo courseInfoVo);

    CourseInfoVo getCourseOne(String courseId);

    boolean updateCourseAndCourseDescriptionsById(CourseInfoVo courseInfoVo);

    CoursePublishVo getPublishById(String courseId);

    boolean deleteCourseById(String courseId);

    //首页显示 固定前8个数据 按View_count排序
    List<Course> getCourseByLimit8();


    //根据课程id，编写sql语句查询课程信息
    CourseWebVo getBaseCourseInfo(String courseId);

}
